<template>
  <div id="Discounte">
    <div class="main">
      <Row>
        <Col span="16" class="Discounted">
          <Row>
            <Col span="12">
              <!-- 折扣价int是整数部分 dec是小数部分 -->
              <span class="redFont">
                ￥
                <span class="price">{{discounted.disc_price_int}}</span>.{{discounted.disc_price_dec}}
              </span>
            </Col>
            <Col span="12">
            <!-- 原价 -->
              <p class="oldPrice">原价￥{{discounted.old_price}}</p>
                <!-- 显示折扣标 -->
              <p class="timeDiscounted">限时折扣</p>
            </Col>
          </Row>
        </Col>
        <Col span="8" class="time">
        
          <p class="lasttext">距离结束仅剩</p>
              <!-- 距离时间 -->
          <p class="lastday">
            {{discounted.disc_day}}天
            <span class="lastNumber">{{discounted.disc_hour}}</span>&nbsp;:&nbsp;
            <span class="lastNumber">{{discounted.disc_minute}}</span>&nbsp;:&nbsp;
            <span class="lastNumber">{{discounted.disc_second}}</span>
          </p>
        </Col>
      </Row>
    </div>
  </div>
</template>

<script>
//导入iview-ui组件
import { Row, Col } from "view-design";
export default {
  name: "Discounte",
  //组件注册
  components: {
    Row,
    Col
  },
  //传输属性数据
  props:['discounted'],
  data() {
    return {
      
    };
  },
  computed: {},
  watch: {},
  methods: {},
  created() {},
  mounted() {},
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {} //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>

<style scoped>
/* 局部UI样式修改 */
.Discounted {
  background-color: white;
  padding: 14px 18px;
  margin-bottom: 8px;
}
.redFont {
  color: #fe7752;
  font-size: 8px;
}
.price {
  font-size: 40px;
}
.oldPrice {
  font-size: 10px;
  color: #888;
  text-decoration: line-through;
}
.timeDiscounted {
  background-color: #fe7752;
  border-radius: 3px;
  color: white;
  font-size: 8px;
  padding: 6px;
  margin-right: 45px;
}
.time {
  padding: 15px 2px;
  background-color: #f9f1e7;
  font-size: 12px;
  text-align: center;
}
.lasttext {
  padding-bottom: 8px;
}
.lastday {
  color: #f5a623;
}
.lastNumber {
  display: inline-block;
  background-color: #f5a623;
  color: white;
  padding: 3px;
  border-radius: 3px;
}
</style>